﻿<!--
	RegExpress
	
	Copyright (c) 2010, Daniel McGaughran
	
	Licensed under the Apache Licence, Version 2.0 (the "Licence");
	you may not use this file except in compliance with the Licence.
	You may obtain a copy of the License at
	
		http://www.apache.org/licenses/LICENSE-2.0
	
	Unless required by applicable law or agreed to in writing, software
	distributed under the Licence is distributed on an "AS IS" BASIS,
	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	See the Licence for the specific language governing permissions and
	limitations under the Licence.
	
	-->

<Window x:Class="RegExpress.UI.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="RegExpress" 
    xmlns:xrCt="clr-namespace:XrControls;assembly=XrControls"
    xmlns:util="clr-namespace:XrControls.Util;assembly=XrControls"
    x:Name="mainWin"
    Width="{Binding Path=CurrentWidth, Mode=TwoWay}"
    Height="{Binding Path=CurrentHeight, Mode=TwoWay}"
    Visibility="{Binding Path=Visibility}"
    Style="{StaticResource DefaultWindowStyle}"
    util:KeyCommands.SetName="Root"
    Closing="mainWin_Closing">

	<Window.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="/Resources/ColsAndBrushes.xaml" />

				<ResourceDictionary Source="/Resources/Borders.xaml" />
				<ResourceDictionary Source="/Resources/TextItems.xaml" />

				<ResourceDictionary Source="/Resources/Templates/Buttons.xaml" />
				<ResourceDictionary Source="/Resources/Buttons.xaml" />

				<ResourceDictionary Source="/Resources/TrackControls.xaml" />
				<ResourceDictionary Source="/Resources/Templates/ItemsControls.xaml" />
				<ResourceDictionary Source="/Resources/ItemsControls.xaml" />

				<ResourceDictionary Source="/Resources/OtherControls.xaml" />
			</ResourceDictionary.MergedDictionaries>

		</ResourceDictionary>
	</Window.Resources>

	<DockPanel Margin="24">
		<xrCt:UniformDoubleStack DockPanel.Dock="Bottom">
			<Button Style="{StaticResource HiddenButton}" Command="{Binding FirstSlide}" Margin="8,2,32,2"
					xrCt:UniformDoubleStack.AllowNativeSize="True">
				<Path Style="{StaticResource HiddenPath}"
						Data="M 0,4 L 4,0 L 8,4 M 1,3 L 1,8 L 7,8 L 7,3 M 6,2 L 6,0.5" />
			</Button>
			
			<Button Style="{StaticResource HiddenButton}" Command="{Binding PrevSlide}">
				<Path Style="{StaticResource HiddenPath}" Data="M 0,4 L 8,4 M 4,0 L 0,4 L 4,8" />
			</Button>

			<Button Style="{StaticResource HiddenButton}" Command="{Binding NextSlide}"
					xrCt:UniformDoubleStack.IsAtStackEnd="True">
				<Path Style="{StaticResource HiddenPath}" Data="M 0,4 L 8,4 M 4,0 L 8,4 L 4,8" />
			</Button>
		</xrCt:UniformDoubleStack>
		
		<Frame Source="{Binding CurrentSlideUri}" NavigationUIVisibility="Hidden"
				FocusVisualStyle="{StaticResource BlankFocusIndicator}" />
	</DockPanel>

</Window>
